com.sabro.jbusiness.uteis
Class SelectionManager

java.lang.Object
  extended by com.sabro.jbusiness.uteis.SelectionManager

public class SelectionManager
extends java.lang.Object


Nested Class Summary
static class SelectionManager.SelectionEvent
          SelectionEvent é usada para notificar os observadores que o Selection foi alterado.
static interface SelectionManager.SelectionListener
          SelectionListener define a interface de um objeto que observa as alterações de um Selection.
static class SelectionManager.SelectionListenerItem
           
 
Field Summary
static java.util.Map<java.lang.Class<?>,java.lang.ref.WeakReference<ISelectable>> selecteds
           
 
Constructor Summary
SelectionManager()
           
 
Method Summary
static SelectionManager.SelectionListenerItem addSelectionListener(java.lang.Object objeto, SelectionManager.SelectionListener selectionListener, boolean isWasSelected)
           
static boolean canClose(ISelectable iSelectable)
           
static void fireSelectionPerformed(ISelectable iSelectable, SelectionManager.SelectionEvent e, boolean isWasSelected)
           
static void fireWasSelectedPerformed(ISelectable iSelectable)
           
static void fireWasUnSelectedPerformed(ISelectable iSelectable)
           
static java.lang.String getCloseError()
          Recupera o texto que descreve o motivo pelo qual o objeto não pode ser fechado.
static ISelectable getSelected(java.lang.Class<?> classe)
           
static void removeSelectionListener(SelectionManager.SelectionListener selectionListener)
           
static void removeSelectionListenerItem(SelectionManager.SelectionListenerItem selectionListenerItem)
           
static void requestClose(ISelectable iSelectable)
          Tenta fechar o objeto informado.
static void select(ISelectable iSelectable)
           
static void setCloseError(java.lang.String closeError)
          Armazena o texto que descreve o motivo pelo qual o objeto não pode ser fechado.
static void showCloseErrorMessage(java.awt.Component component)
           
static void showCloseErrorMessage(ISelectable iSelectable)
           
static void unSelect(ISelectable iSelectable)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

selecteds

public static final java.util.Map<java.lang.Class<?>,java.lang.ref.WeakReference<ISelectable>> selecteds
Constructor Detail

SelectionManager

public SelectionManager()
Method Detail

select

public static void select(ISelectable iSelectable)

unSelect

public static void unSelect(ISelectable iSelectable)

getSelected

public static ISelectable getSelected(java.lang.Class<?> classe)

canClose

public static boolean canClose(ISelectable iSelectable)

requestClose

public static void requestClose(ISelectable iSelectable)
Tenta fechar o objeto informado. Se não conseguir fecha-lo, informa o motivo da falha.

Parameters:
iSelectable -

showCloseErrorMessage

public static void showCloseErrorMessage(java.awt.Component component)

showCloseErrorMessage

public static void showCloseErrorMessage(ISelectable iSelectable)

setCloseError

public static void setCloseError(java.lang.String closeError)
Armazena o texto que descreve o motivo pelo qual o objeto não pode ser fechado.


getCloseError

public static java.lang.String getCloseError()
Recupera o texto que descreve o motivo pelo qual o objeto não pode ser fechado.


fireWasSelectedPerformed

public static void fireWasSelectedPerformed(ISelectable iSelectable)

fireWasUnSelectedPerformed

public static void fireWasUnSelectedPerformed(ISelectable iSelectable)

fireSelectionPerformed

public static void fireSelectionPerformed(ISelectable iSelectable,
                                          SelectionManager.SelectionEvent e,
                                          boolean isWasSelected)

addSelectionListener

public static SelectionManager.SelectionListenerItem addSelectionListener(java.lang.Object objeto,
                                                                          SelectionManager.SelectionListener selectionListener,
                                                                          boolean isWasSelected)

removeSelectionListenerItem

public static void removeSelectionListenerItem(SelectionManager.SelectionListenerItem selectionListenerItem)

removeSelectionListener

public static void removeSelectionListener(SelectionManager.SelectionListener selectionListener)